Optimal. Leaf size=29 \[ \frac {a \log (\cosh (c+d x))}{d}-\frac {b \text {sech}^2(c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {4138, 14} \[ \frac {a \log (\cosh (c+d x))}{d}-\frac {b \text {sech}^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 4138
Rubi steps
\begin {align*} \int \left (a+b \text {sech}^2(c+d x)\right ) \tanh (c+d x) \, dx &=\frac {\operatorname {Subst}\left (\int \frac {b+a x^2}{x^3} \, dx,x,\cosh (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {b}{x^3}+\frac {a}{x}\right ) \, dx,x,\cosh (c+d x)\right )}{d}\\ &=\frac {a \log (\cosh (c+d x))}{d}-\frac {b \text {sech}^2(c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 29, normalized size = 1.00 \[ \frac {a \log (\cosh (c+d x))}{d}-\frac {b \text {sech}^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.42, size = 359, normalized size = 12.38 \[ -\frac {a d x \cosh \left (d x + c\right )^{4} + 4 \, a d x \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + a d x \sinh \left (d x + c\right )^{4} + a d x + 2 \, {\left (a d x + b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, a d x \cosh \left (d x + c\right )^{2} + a d x + b\right )} \sinh \left (d x + c\right )^{2} - {\left (a \cosh \left (d x + c\right )^{4} + 4 \, a \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + a \sinh \left (d x + c\right )^{4} + 2 \, a \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, a \cosh \left (d x + c\right )^{2} + a\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (a \cosh \left (d x + c\right )^{3} + a \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + a\right )} \log \left (\frac {2 \, \cosh \left (d x + c\right )}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right ) + 4 \, {\left (a d x \cosh \left (d x + c\right )^{3} + {\left (a d x + b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{d \cosh \left (d x + c\right )^{4} + 4 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + d \sinh \left (d x + c\right )^{4} + 2 \, d \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, d \cosh \left (d x + c\right )^{2} + d\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (d \cosh \left (d x + c\right )^{3} + d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.13, size = 80, normalized size = 2.76 \[ -\frac {2 \, a d x - 2 \, a \log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right ) + \frac {3 \, a e^{\left (4 \, d x + 4 \, c\right )} + 6 \, a e^{\left (2 \, d x + 2 \, c\right )} + 4 \, b e^{\left (2 \, d x + 2 \, c\right )} + 3 \, a}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.14, size = 29, normalized size = 1.00 \[ -\frac {b \mathrm {sech}\left (d x +c \right )^{2}}{2 d}-\frac {a \ln \left (\mathrm {sech}\left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 27, normalized size = 0.93 \[ \frac {b \tanh \left (d x + c\right )^{2}}{2 \, d} + \frac {a \log \left (\cosh \left (d x + c\right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.47, size = 72, normalized size = 2.48 \[ \frac {2\,b}{d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )}-\frac {2\,b}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-a\,x+\frac {a\,\ln \left ({\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+1\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.49, size = 42, normalized size = 1.45 \[ \begin {cases} a x - \frac {a \log {\left (\tanh {\left (c + d x \right )} + 1 \right )}}{d} - \frac {b \operatorname {sech}^{2}{\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (a + b \operatorname {sech}^{2}{\relax (c )}\right ) \tanh {\relax (c )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________